package cc.geeksearch.ble

import androidx.lifecycle.MutableLiveData
import cc.geeksearch.ble.bean.DeviceBean
import cc.geeksearch.ble.bean.LogBean
import cc.geeksearch.ble.bean.ScanItemBean
import cc.geeksearch.ble.bean.ServiceBean

object LiveDataBus {

    // 扫描设备结果
    val scanLiveData = MutableLiveData<MutableList<ScanItemBean>>()

    /**
     * 扫描状态
     * 0 开始扫描
     * 1 扫描结束
     * 2 扫描出错
     */
    val scanStatusLiveData = MutableLiveData<Int>()

    // 已绑定的设备列表
    val devicesLiveData = MutableLiveData<MutableList<DeviceBean>>()

    val deviceStatusLiveData = MutableLiveData<DeviceBean>()

    val uuidLiveData = MutableLiveData<MutableMap<String, MutableList<ServiceBean>>>()

    val dataLogData = MutableLiveData<LogBean>()
}